using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class AD_TRTProgressMap : EntityTypeConfiguration<AD_TRTProgress>
    {
        public AD_TRTProgressMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.AdmissionID)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.Physician)
                .HasMaxLength(6);

            // Table & Column Mappings
            this.ToTable("AD_TRTProgress");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.AdmissionID).HasColumnName("AdmissionID");
            this.Property(t => t.Entry_date).HasColumnName("Entry_date");
            this.Property(t => t.Exit_date).HasColumnName("Exit_date");
            this.Property(t => t.Department).HasColumnName("Department");
            this.Property(t => t.Note).HasColumnName("Note");
            this.Property(t => t.Physician).HasColumnName("Physician");
        }
    }
}
